<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); 
mm_showMyFileName( __FILE__ );

$db =& JFactory::getDBO();

$user_id = (int)$_SESSION["auth"]["user_id"];

$q =  "SELECT `user_info_id`,`user_id`,`address_type` FROM #__vm_user_info WHERE `user_id` = $user_id";

$db->setQuery($q);
$rs = $db->loadObjectList();
if(count($rs) == 1) echo $rs[0]->user_info_id;
else echo $rs[1]->user_info_id;

exit;
